<template>
    <div class="w-full h-full flex flex-col">
        <div class="w-full flex flex-row justify-between items-center">
            <div class="flex flex-row items-center">
                <el-select class="mr-w20" v-model="s_report.company_id" placeholder="请选择公司"
                    @change="action_choise_company" clearable>
                    <el-option v-for="item in s_report.list_company" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
                <el-select class="mr-w20" v-model="s_report.assess_id" placeholder="请选择报告" clearable
                    @change="action_list_report">
                    <el-option v-for="item in s_report.list_assess" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
                <!-- <el-select class="mr-w20" v-model="s_report.staff_id" placeholder="请选择员工" clearable
                    @change="action_list_report">
                    <el-option v-for="item in s_staff.list_staff" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select> -->
                <el-date-picker class="mr-w20" v-model="s_report.reportDate" type="date" placeholder="选择日期"
                    value-format="timestamp" @change="action_list_report">
                </el-date-picker>
            </div>
            <!-- <el-button type="primary" icon="el-icon-takeaway-box" class=" bg-cmain" @click="action_export_report">导出本页报告
            </el-button> -->
        </div>
        <div class="w-full h-full mt-w20 ">
            <el-table :data="s_report.list_log" height="700" stripe style="width: 100%; ">
                <el-table-column type="index" label="序号" min-width="10%">
                </el-table-column>
                <el-table-column prop="name" label="报告名称" min-width="20%">
                </el-table-column>
                <el-table-column prop="time" label="报告时间" min-width="20%">
                </el-table-column>
                <el-table-column label="操作" min-width="10%">
                    <template slot-scope="scope">
                        <el-button size="mini" @click="action_download_report(scope.row)">
                            报告下载</el-button>
                    </template>
                </el-table-column>
            <!-- <el-table :data="s_report.list_report" height="700" stripe style="width: 100%; ">
                <el-table-column type="index" label="序号" min-width="10%">
                </el-table-column>
                <el-table-column prop="company" label="公司名称" min-width="10%">
                </el-table-column>
                <el-table-column prop="job" label="工号" min-width="10%">
                </el-table-column>
                <el-table-column prop="phone" label="员工手机号" min-width="10%">
                </el-table-column>
                <el-table-column prop="name" label="员工姓名" min-width="10%">
                </el-table-column>
                <el-table-column prop="assess" label="量表名称" min-width="20%">
                </el-table-column>
                <el-table-column prop="time" label="报告时间" min-width="10%">
                </el-table-column>
                <el-table-column label="操作" min-width="10%">
                    <template slot-scope="scope">
                        <el-button size="mini" @click="action_download_report(scope.row)">
                            报告下载</el-button>
                    </template>
                </el-table-column> -->
            </el-table>
            <div class="w-full flex items-end justify-center" style="height:7%">
                <el-pagination background layout="prev, pager, next" :total="s_report.m_page.total"
                    :page-size="s_report.m_page.limit" @current-change="action_page_change">
                </el-pagination>
            </div>
        </div>
    </div>
</template>

<script src="./Index.ts"></script>
<style src="./Index.less" lang="less" scoped>
</style>
